package com.sip.stream.utils.zfy;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;

public class ZFYUserInfo {
    @SerializedName("serial")
    private String serial;

    @SerializedName("userName")
    private String userName = "-";

    @SerializedName("userCode")
    private String userCode = "000000";

    @SerializedName("unitName")
    private String unitName = "-";

    @SerializedName("unitCode")
    private String unitCode = "000000";

    @SerializedName("virtualSNCode")
    private String virtualSNCode = null;

    public static ZFYUserInfo defaultUserInfo() {
        ZFYUserInfo zFYUserInfo = new ZFYUserInfo();
        zFYUserInfo.setUserName("-");
        zFYUserInfo.setUserCode("000000");
        zFYUserInfo.setUnitName("-");
        zFYUserInfo.setUnitCode("000000");
        zFYUserInfo.setSerial("0000000");
        return zFYUserInfo;
    }

    public String getUserCode() {
        String str = this.userCode;
        if (str == null || str.length() == 0) {
            this.userCode = "000000";
        }
        return this.userCode;
    }


    public ZFYUserInfo deepClone() {
        ZFYUserInfo zFYUserInfo = new ZFYUserInfo();
        zFYUserInfo.setUnitCode(this.unitCode);
        zFYUserInfo.setUnitName(this.unitName);
        zFYUserInfo.setUserCode(this.userCode);
        zFYUserInfo.setUserName(this.userName);
        zFYUserInfo.setVirtualSNCode(this.virtualSNCode);
        return zFYUserInfo;
    }

    public String getUserName() {
        return this.userName;
    }

    public String getSerial() {
        return this.serial;
    }

    public void setSerial(String serial) {
        this.serial = serial;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUnitName() {
        return this.unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getUnitCode() {
        return this.unitCode;
    }

    public void setUnitCode(String unitCode) {
        this.unitCode = unitCode;
    }

    public String getVirtualSNCode() {
        return this.virtualSNCode;
    }

    public void setVirtualSNCode(String virtualSNCode) {
        this.virtualSNCode = virtualSNCode;
    }


    public String toString() {
        return new Gson().toJson(this);
    }
}
